#ifdef ONLINE_JUDGE
    #include<stdio.h>
    #define INPUT stdin
    int cycle(int n);
    int swap(int *i,int *j);
    int main() {
#else
    #include"header.h"
    #define INPUT fptIn
    int acm_00100() {
        printf("--ACM 100 begin here--\n");
        FILE *fptIn = fopen("Resource/acm_00100.txt", "r");
        if ( fptIn == NULL )//Distinguish the fptIn file is load success.
        {
            printf("File acm_00100.txt load fail.\n");
            printf("Program will exit.\n");
            return EXIT_FAILURE;
        }
#endif

    int i, j, cl, max;
    while (fscanf(INPUT, "%d %d", &i, &j) == 2) {
        max = 0;
        fprintf(stdout, "%d %d ", i, j);
        if (i > j) {
            swap( &i, &j );
        }
        for (; i <= j; i = i + 1) {
            cl = cycle(i);
            if (cl > max) {
                max = cl;
            }
        }
        fprintf(stdout, "%d\n", max);

    }
    #ifndef ONLINE_JUDGE
        fclose(fptIn);
        printf("--ACM 100 end here--\n");
    #endif
    return 0;
}

int cycle(int n) {
    int cl = 1;
    while (n != 1) {
        cl = cl + 1;
        if (n % 2 == 1) {
            n = 3 * n + 1;
        } else {
            n = n / 2;
        }
    }
    return cl;
}
int swap(int *i,int *j){
        *i = *i + *j;
        *j = *i - *j;
        *i = *i - *j;
        return 0;
}
/*
Problem    Ranking    Submission      Date                   Run time    Memo
100        14105      7448513         2009-10-02 06:49:08    0.928       v1:Not use conditional compilation
100                                   2011-05-23 18:11:27    1.392 	     v2:Use conditional compilation
 */
